<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><s:if test="topic.topicId==null"><s:text name="topic.add.title"/></s:if><s:else><s:text name="topic.edit.title"/></s:else></title>
	<%@ include file="/common/meta.jsp"%>
	<%@ include file="/common/common.jsp"%>
	<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>

</head>
<body>
<s:set name="siteId" value="#session['CURRENT_SITE'].siteId"></s:set>
<div id="wrapper">
	<div class="curmb"><s:text name="your.site.position"/>:<a href="${ctx}/main.action"><s:text name="homepage"/></a><span>></span><s:text name="topic.title"/></div>
	<div class="listtit"><p><span><strong><s:if test="topic.topicId==null"><s:text name="topic.add.title"/></s:if><s:else><s:text name="topic.edit.title"/></s:else></strong></span></p></div>
	<div class="listadd">
		<s:hidden name="topic.topicName" id="tpName"/>
		<s:hidden name="topic.topicSimpleName" id="topicSimpleName"/>
		<s:form action="topic-save" onsubmit="return chkform()">
		<s:hidden name="topic.topicId" id="topicId"/>
		<s:hidden name="topic.site.siteId" id="siteId"/>
		<div class="listoperate" id="listoperate">
	    <span class="space20"></span>
		     <a href="#" id="basic" class="alinkscurrent"><s:text name="基本信息"/></a>|
		     <a href="#" id="attachConfig" class="alinks"><s:text name="附件配置" /> </a>
		</div>
		<table id="bs" class="addgrid">
			<tr>
				<th><s:text name="topic.topicName"/>:</th>
				<td><s:textfield name="topic.topicName" maxlength="10" required="true" requiredposition="right" cssClass="txtin" id="topName" onkeyup="check()"/>
					<span id="point-topicName-Message" style="color: red;">*</span>
					<span id="topNamePointMessage"></span>
				</td>
				<th><s:text name="topic.topicSimpleName"/>:</th>
				<td colspan="3"><s:textfield name="topic.topicSimpleName" maxlength="10" required="true" requiredposition="right" cssClass="txtin" id="simName" onkeyup="this.value=this.value.replace(/[\W]|[A-Z]/g,'')" onchange="this.value=this.value.replace(/[\W]|[A-Z]/g,'')"/>
					<span style="color: red">*</span>
					<span id="point-topicSimpleName-Message" style="color: #457d07">(友情提示:只能输入20个由小写字母、数字、下划线组成的字符)</span>
					<span id="topSimNamePointMessage"></span>
				</td>
			</tr>
			<tr>
				<th><s:text name="topic.endTime"/>:</th>
				<%-- <td><sx:datetimepicker name="topic.endTime"  cssClass="txtsearch" displayFormat="yyyy-MM-dd" javascriptTooltip="aasddfasf" /><span style="color: red">*</span><span id="topicendTimeno"></span></td> --%>
				<td><input name="topic.endTime" size="30"  class="Wdate" id="qry_startTime_1" readonly="true"  value="<s:date name="topic.endTime" format="yyyy-MM-dd HH:mm:ss"/>"
							onFocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text"/><span style="color: red">*</span><span id="topicendTimeno"></span></td>
				<th><s:text name="topic.keywords"/>:</th>
				<td><s:textfield id="keywords" maxlength="20" name="topic.keywords" required="true" requiredposition="right" cssClass="txtin"/>
					<span style="color: red">*</span><span style="color: #457d07">(多个关键字用逗号","隔开)</span>
					<span id="keywordmsg"></span>
				</td>
			</tr>
			<tr>
				<th><s:text name="topic.topicIndexTpl"/>:</th>
				<td>
					<s:textfield name="topic.topicIndexTpl" id="selectIndex" required="true" requiredposition="right" cssClass="txtin" readonly="true"/>
					<a href="#"  onclick="selectIndexTpl();"><s:text name="choice"/></a>
				</td>
				<th><s:text name="topic.topicContextListTpl"/>:</th>
				<td>
					<s:textfield name="topic.topicContextListTpl" id="catContentListTpl" required="true" requiredposition="right" cssClass="txtin" readonly="true"/>
					<a href="#"  onclick="contentListTpl()"><s:text name="choice"/></a>
				</td>
			</tr>
			<tr>
				<th><s:text name="topic.topicContentTplSet"/>:</th>
				<td>
					<s:textfield name="topic.topicContentTplSet" id="catDefaultContentTpl" required="true" requiredposition="right" cssClass="txtin" readonly="true"/>
					<a href="#"  onclick="defaultContentTpl()"><s:text name="choice"/></a>
				</td>
				<th><s:text name="topic.topicDefaultContentTpl"/>:</th>
				<td>
					<s:textfield name="topic.topicDefaultContentTpl" id="catContentTplSet" required="true" requiredposition="right" cssClass="txtin" readonly="true"/>
					<a href="#"  onclick="contentTplSet()"><s:text name="choice"/></a>
				</td>
			</tr>
			<tr>
				
			</tr>
			<tr>
				<th><s:text name="是否需要审核"/>:</th>
				<td>
					<s:if test="dicIsAudit!=null && topic.topicId!=null">
							<s:radio name="topic.isAudit" list="dicIsAudit" listKey="dictionaryKey" listValue="dictionaryValue" 
							value="topic.isAudit" id="auDit"/>
					</s:if>
					<s:elseif test="dicIsAudit!=null && topic.topicId==null">
						<s:radio name="topic.isAudit" list="dicIsAudit" listKey="dictionaryKey" listValue="dictionaryValue" 
							value="true" id="auDit"/>
					</s:elseif>
					<span style="color: #457d07">(指该专题下的文章是否需要审核)</span>
				</td>
				<th>设置审核人:</th>
				<td colspan="3">
					<s:textfield id="showAuthor" name="topic.auditor" required="true" requiredposition="right" cssClass="txtin" readonly="true"/>
					<a href="#" id="authorSelect" onclick="authorSelect()"><s:text name="choice"/></a>
				</td>
			</tr>
			
			<s:if test="orig.equals(\"audit\")">
			<s:hidden name="orig" value="audit" id="orig"/>
				<tr>
					<th>最后一次<s:text name="auditTime"/>:</th>
					<td><s:textfield name="topic.auditTime" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
					<th>最后一次<s:text name="auditRealName"/>:</th>
					<td><s:textfield name="topic.auditRealName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
				</tr>
				<tr>
					<th>审核是否通过:</th>
					<td>
						<select id="ts" name="topic.topicStatus">
							<option value="0">请选择审核意见</option>
							<option value="1">通过</option>
							<option value="2">不通过</option>
						</select>
						<span id="tsMessage"></span>
					</td>
					<th><s:text name="topic.topicStatus"/>:</th>
					<td>
						<s:property value="%{getName(topic.topicStatus,'TOPIC_STATUS')}"/>
					</td>
				</tr>
				<tr>
					<th>审核意见：</th>
					<td colspan="3">
						<s:textarea onkeyup="checkPhotoAlertNum()" name="topic.auditOption" cssStyle="height:60px;width:718px;overflow-y:visible;" maxlength='200' required="true" requiredposition="right" cssClass="txtin"></s:textarea>
					</td>
				</tr>
			</s:if>
			
			<s:if test="orig.equals(\"edit\")">
			<tr>
				<th><s:text name="topic.topicStatus"/>:</th>
				<td>
					<s:property value="%{getName(topic.topicStatus,'TOPIC_STATUS')}"/>
				</td>
				<th><s:text name="topic.isEnable"/>:</th>
				<td colspan="3"><s:if test="topic.isEnable == 1"><s:text name="enable"/></s:if><s:else><s:text name="disable"/></s:else></td>
			</tr>
			<tr>
				<th><s:text name="createTime"/>:</th>
				<td><s:textfield name="topic.createTime" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"><s:param name="value"><s:date name="topic.createTime" format="yyyy-MM-dd HH:mm:ss"/></s:param></s:textfield></td>
				<th><s:text name="updateTime"/>:</th>
				<td><s:textfield name="topic.updateTime" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"><s:param name="value"><s:date name="topic.updateTime" format="yyyy-MM-dd HH:mm:ss"/></s:param></s:textfield></td>
			</tr>
			<tr>
				<th><s:text name="createLoginName"/>:</th>
				<td><s:textfield name="topic.createLoginName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
				<th><s:text name="updateLoginName"/>:</th>
				<td><s:textfield name="topic.updateLoginName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
			</tr>
			<tr>
				<th><s:text name="createRealName"/>:</th>
				<td><s:textfield name="topic.createRealName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
				<th><s:text name="updateRealName"/>:</th>
				<td><s:textfield name="topic.updateRealName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
			</tr>
			<tr>
				<th>最后一次<s:text name="auditTime"/>:</th>
				<td><s:textfield name="topic.auditTime" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"><s:param name="value"><s:date name="topic.auditTime" format="yyyy-MM-dd HH:mm:ss"/></s:param></s:textfield></td>
				<th><s:text name="topic.publishTime"/>:</th>
				<td><s:textfield name="topic.publishTime" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"><s:param name="value"><s:date name="topic.publishTime" format="yyyy-MM-dd HH:mm:ss"/></s:param></s:textfield></td>
			</tr>
			<tr>
				<th>最后一次<s:text name="auditLoginName"/>:</th>
				<td><s:textfield name="topic.auditLoginName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
				<th><s:text name="topic.publishLoginName"/>:</th>
				<td><s:textfield name="topic.publishLoginName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
			</tr>
			<tr>
				<th>最后一次<s:text name="auditRealName"/>:</th>
				<td><s:textfield name="topic.auditRealName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
				<th><s:text name="topic.publishRealName"/>:</th>
				<td><s:textfield name="topic.publishRealName" required="true" requiredposition="right" cssClass="txtin unable" readonly="true"/></td>
			</tr>
			<tr>
				<th>最后一次审核意见：</th>
				<td colspan="3">
					<s:textarea name="topic.auditOption" cssStyle="height:60px;width:718px;overflow-y:visible;" maxlength='200'  readonly="true" required="true" requiredposition="right" cssClass="txtin"></s:textarea>
				</td>
			</tr>
		</s:if>
		</table>
		<table class="addgrid" id="at" style="display: none">
			<tr>
				<td align="center"><s:text name="配置项"/></th>
				<td align="center"><s:text name="参数值"/></th>
			</tr>
			<tr>
				<th><s:text name="小图片尺寸"/>:</th>
				<td>
					<s:textfield  name="topic.smallPictureSize" required="true" maxlength='64'  requiredposition="right" cssClass="txtin" onkeyup="check()"/>
					<span style="color: #457d07">(高和宽用下划线隔开，例：137_83 )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name=" 中图片尺寸"/>:</th>
				<td>
					<s:textfield   name="topic.middlePictureSize" required="true" maxlength='64'  requiredposition="right" cssClass="txtin" onkeyup="check()"/>
					<span style="color: #457d07">(高和宽用下划线隔开，例：137_83 )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="大图片尺寸"/>:</th>
				<td>
					<s:textfield   name="topic.bigPictureSize" required="true" maxlength='64'  requiredposition="right" cssClass="txtin" onkeyup="check()"/>
					<span style="color: #457d07">(高和宽用下划线隔开，例：137_83 )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="图片类型"/>:</th>
				<td>
					<s:textfield   name="topic.picType" required="true" maxlength='64'  requiredposition="right" cssClass="txtin" onkeyup="check()"/>
					<span style="color: #457d07">(类型之间用 | 隔开，例：jpg|gif|png )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="动画类型"/>:</th>
				<td>
					<s:textfield   name="topic.cartoonType" required="true" maxlength='64'  requiredposition="right" cssClass="txtin" onkeyup="check()"/>
					<span style="color: #457d07">(类型之间用 | 隔开，例：swf|mpg |rm|rmvb|wmv|wma|wav|mid|mov )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="视频类型"/>:</th>
				<td>
					<s:textfield   name="topic.videoType" required="true" maxlength='64'  requiredposition="right" cssClass="txtin" onkeyup="check()"/>
					<span style="color: #457d07">(类型之间用 | 隔开，例：swf|mpg |rm|rmvb|wmv|wma|wav|mid|mov )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="软件类型"/>:</th>
				<td>
					<s:textfield   name="topic.softWareType" required="true" maxlength='64'  requiredposition="right" cssClass="txtin" onkeyup="check()"/>
					<span style="color: #457d07">(类型之间用 | 隔开，例：exe|iso|zip|7z|rar|gz )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="图片附件大小控制"/>:</th>
				<td>
					<s:textfield   name="topic.pictureAdvice" required="true" maxlength='11'  requiredposition="right" cssClass="txtin" onkeyup="this.value=this.value.replace(/\D/g,'')" />
					<span style="color: #457d07">(M)</span> <span style="color: #457d07">(最多只能输入11位的数字 )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="动画附件大小控制"/>:</th>
				<td>
					<s:textfield   name="topic.cartoonAdvice" required="true" maxlength='11'  requiredposition="right" cssClass="txtin" onkeyup="this.value=this.value.replace(/\D/g,'')" />
					<span style="color: #457d07">(M)</span> <span style="color: #457d07">(最多只能输入11位的数字 )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="视频附件大小控制"/>:</th>
				<td>
					<s:textfield   name="topic.videoAdvice" required="true" maxlength='11'  requiredposition="right" cssClass="txtin" onkeyup="this.value=this.value.replace(/\D/g,'')" />
					<span style="color: #457d07">(M)</span> <span style="color: #457d07">(最多只能输入11位的数字 )</span>
				</td>
			</tr>
			<tr>
				<th><s:text name="软件附件大小控制"/>:</th>
				<td>
					<s:textfield   name="topic.softwareAdvice" required="true" maxlength='11'  requiredposition="right" cssClass="txtin" onkeyup="this.value=this.value.replace(/\D/g,'')" />
					<span style="color: #457d07">(M)</span> <span style="color: #457d07">(最多只能输入11位的数字 )</span>
				</td>
			</tr>
		</table>
		<br/>
		<table>
			<tr>
				<td align="center" colspan="4">
				<s:if test="%{authLicence('2_2_3',#siteId)}">
					<s:submit value="%{getText('save')}" cssClass="btnlist2" id="save_button" disabled="true"/>		 
				</s:if>
				<s:elseif test="%{authLicence('4_4_1',topic.topicId)}">
					<s:submit value="%{getText('save')}" cssClass="btnlist2"/>		
				</s:elseif>	
				<s:else>
					<s:submit value="%{getText('save')}" disabled="true" cssClass="btnlist2"/>		
				</s:else>
				<span style="color: #457d07" id="saveInfo"></span>
					<s:reset value="%{getText('returnflag')}" onclick="goBack()" cssClass="btnlist2"/>
				</td>
			</tr>
		</table>
		</s:form>
	</div>
</div>
<div id="lightbox" class="lightbox">
	<div class="lighttit"><p><span><input type="button" value="&nbsp;" id="lightclose" class="lightclose" /><strong>审核人设置</strong></span></p></div>
	<div class="lightmain">
		<div class="lightmaintit">请选择审核人</div>
		<div class="ilghtmainbox">
			<div id="authorSetDiv"></div>
		</div>
		<div class="lightbtnbox"><input type="button" value="确认" id="lightsubmit" class="btnlist2" onclick="authorSet()"/><input type="button" value="关闭" id="closebtn" class="btnlist2" /></div>
	</div>
</div>
<script type="text/javascript">
$("#authorSelect").bind("click",function(){
	$$.shade("#authorSelect","#lightclose,#closebtn,#lightsubmit","#lightbox");
});
</script>
</body>
</html>
<script type="text/javascript" defer="defer">

	var topicId = $("#topicId").val();
	var siteId = $("#siteId").val();
	
	//审核人设置-选择审核人
	function authorSelect(categoryId){
		$.getJSON("${ctx}/topic/topic-authorsetselect.action",function(data){
			var htmlStr = "";
			var authorArray = new Array(data.length);
			for(var i=0;i<data.length;i++){
				var adminId = data[i].adminId;
				var loginName = data[i].loginName;
				var realName=data[i].realName;
				if(realName==null){
					authorArray[i]="<li><input name=\"autor\" onclick=\"authorSet()\" type='checkbox' value='"+loginName+"'>&nbsp;<a id='siteStatus"+i+"'>"+loginName+"</a></li>";
				}else{
					authorArray[i]="<li><input name=\"autor\" onclick=\"authorSet()\" type='checkbox' value='"+loginName+"'>&nbsp;<a id='siteStatus"+i+"'>"+loginName+"</a>&nbsp;&nbsp;<a id='realName"+i+"'>"+realName+"</a></li>";
				}
				
			}
			htmlStr = authorArray.join("");
			$("#authorSetDiv").html("<ul id='shenheul'>"+htmlStr+"</ul>");
			
			//回显已经选中的审核人
			var author = $("#showAuthor").val();
			var  authors = author.split(",");
			$("input[name='autor']").each(function(i){
					for(var i=0;i<authors.length;i++){
						if($(this).attr("value")==authors[i]){
							$(this).attr("checked",true);
							//$(this).attr("disabled",true);
						}
					}
			});
	});
	}
	//审核人设置-添加到审核人文本框
	function authorSet(adminName,categoryId){
		 var arr = new Array();
			$("#authorSetDiv").find('input:checkbox[name="autor"]:checked').each(function(i,item){
				 var s = $(item).val();
				 arr.push(s);
			});
		    var  str = arr.join(',');
		 $("#showAuthor").val(str);
	}
	//新增专题时设置默认模板
	if(topicId == null || topicId == ""){
		$("#selectIndex").val("/theme/default/topic/style1/index.tpl");
		$("#catContentListTpl").val("/theme/default/topic/style1/list.tpl");
		$("#catDefaultContentTpl").val("/theme/default/content/style1/article/list.tpl");
		$("#catContentTplSet").val("/theme/default/content/style1/article/list.tpl");
	}
	
	
	//首页模板
	function selectIndexTpl(){
		var url = "${ctx}/theme/file-select.action?type=topic&prefix=index&suffix=tpl&elementId=selectIndex"; 
		window.open(url); 
	}
	//文章列表模板
	function contentListTpl(){
		var url = "${ctx}/theme/file-select.action?type=topic&prefix=list&suffix=tpl&elementId=catContentListTpl"; 
		window.open(url); 
	}
	//默认文章模板
	function defaultContentTpl(){
		var url = "${ctx}/theme/file-select.action?contentType=article&prefix=list&suffix=tpl&elementId=catDefaultContentTpl"; 
		window.open(url); 
	}
	//可选文章模板
	function contentTplSet(){
		var url = "${ctx}/theme/file-select.action?contentType=article&prefix=list&suffix=tpl&elementId=catContentTplSet"; 
		window.open(url); 
	}
	
	//检测唯一、空
	var isUni="no";
	function chkform(){
		$("#topNamePointMessage").html("");
		$("#keywordmsg").html("");
		$("#topicendTimeno").html("");
		$("#point-topicSimpleName-Message").html("");
		var ts = $("#ts").val();
		if(ts == 0){
			$("#tsMessage").css("color","red");
			$("#tsMessage").html("请选择是否通过");
			return false;
		}
		var topicName = $("#topName").val();
		var simpleName = $("#simName").val();
		var keywords = $("#keywords").val();
		
		var topName = topicName.replace(/(^\s*)|(\s*$)/g, "");
		var simName = simpleName.replace(/(^\s*)|(\s*$)/g, "");
		var kwords = keywords.replace(/(^\s*)|(\s*$)/g, "");
		
		var obj = {"topic.topicName":topName};		
		if(topName == null || topName == ""){
			$("#topNamePointMessage").css("color","red");
			$("#topNamePointMessage").html("专题名称不能为空");
			return false;
		}
		var ss=$("#topSimNamePointMessage").val();
		if(ss=="ok"){
			return false;
		}
		if(kwords == null || kwords == ""){
			$("#keywordmsg").css("color","red");
			$("#keywordmsg").html("关键字不能为空");
			return false;
		}
		if(isUni == "have"){
			$("#topNamePointMessage").css("color","red");
			$("#topNamePointMessage").html("专题名称已经存在");
			return false;
		}
		///判断 截至时间不能小于当前时间日期
		if(topicId == null || topicId == ""){
			var end=$("input[name=topic.endTime]").val().substr(0,10);
			var d=new Date();
			var vYear = d.getFullYear();
			var vMon = d.getMonth() + 1;
			var vDay = d.getDate();
			var todayTime=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay);
			if(end<todayTime){
				$("#topicendTimeno").html("截止日期应大于当前日期");
				$("#topicendTimeno").css("color","red");
				return false;
			}
		}
		
		var simName=$("#simName").val();
		if(simName==null||simName==""){
			$("#point-topicSimpleName-Message").html("专题简称不能为空!");
			$("#point-topicSimpleName-Message").css("color","red");
			document.getElementById("save_button").disabled = true;
			return false;
		}	
	}
	
	
	//输入1秒后检测用户名
	 var timer = false;
	 var fla = "no";
     function check() {
   	 if (timer) {
            clearTimeout(timer);
            timer = false;
     }
  	 timer = setTimeout(function () {
		   checkUniName();
  	 }, 1000);
	}
	
	//唯一检测，如果专题名不为空进行数据库校验
	function checkUniName(){
		var tpName =$("#tpName").val();
		var topName = $("#topName").val();
		var obj = {"topic.topicName":topName,"tname":tpName};
		if(topName != null && topName != ""){
			$.post("${ctx}/topic/topic-checknameunique.action",obj,function(data){
				if(data == "ok"){
					$("#topNamePointMessage").css("color","#457d07");
					$("#topNamePointMessage").html("恭喜!专题名称可用");
					isUni = "no";
				}else{
					$("#topNamePointMessage").css("color","red");
					$("#topNamePointMessage").html("抱歉!专题名称已经被占用，请重新输入");
					isUni = "have";
					return false;
				}
			});
		}
	}
	function goBack(){
		document.location.href="${ctx}/topic/topic-list.action";
	}
	///栏目简称唯一性校验
	$(function(){
		if(topicId != null && topicId != ""){
			var simName=$("#simName").val();
			if(simName==null||simName==""){
				$("#point-topicSimpleName-Message").html("专题简称不能为空!");
				$("#point-topicSimpleName-Message").css("color","red");
				document.getElementById("save_button").disabled = true;
			}else{
				$("#point-topicSimpleName-Message").html("");
				$("#point-topicSimpleName-Message").css("color","red");
				document.getElementById("save_button").disabled = false;
			}
		}
		$("#simName").keyup(function(){
			var simName=$("#simName").val();
			var oldSimpleName=$("input[name=topic.topicSimpleName]").val();
			var obj={"topic.topicSimpleName":simName,"oldSimpleName":oldSimpleName};
			if(simName==null||simName==""){
				$("#point-topicSimpleName-Message").html("专题简称不能为空!");
				$("#point-topicSimpleName-Message").css("color","red");
				$("#topSimNamePointMessage").val("ok");
				document.getElementById("save_button").disabled = true;
			}else{
				$.post(
						"${ctx}/topic/topic-checkSimplenameunique.action",
						obj,
						function(data){
							if(data=="no"){
								$("#point-topicSimpleName-Message").html("专题简称已注册!");
								$("#point-topicSimpleName-Message").css("color","red");
								$("#topSimNamePointMessage").val("ok");
								document.getElementById("save_button").disabled = true;
							}if(data=="yes"){
								$("#point-topicSimpleName-Message").html("");
								$("#point-topicSimpleName-Message").css("color","red");
								$("#topSimNamePointMessage").val("");
								document.getElementById("save_button").disabled = false; 
							}
						}
				);
			}
		
		});
	});
	
	
	//基本信息、附件配置信息切换
 	$("#attachConfig").click(function(){
 		$("#basic").removeClass("alinkscurrent").addClass("alinks");
 		$("#attachConfig").removeClass("alinks").addClass("alinkscurrent");
 		
 		$("#at").css("display",'block');
 		$("#bs").css("display",'none');
 		
 		$("#saveInfo").html("(请确认专题基本信息是否填写正确)"); 		
 	})
 	$("#basic").click(function(){
 		$("#basic").removeClass("alinks").addClass("alinkscurrent");
 		$("#attachConfig").removeClass("alinkscurrent").addClass("alinks");
 	
 		$("#at").css("display",'none');
 		$("#bs").css("display",'block');
 		
 		$("#saveInfo").html("");
 	})
	
</script>